Add missing INLINE's on EnumContainers #5499
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
I was partaking in my now daily ritual ritual of staring into the void (a.k.a. GHC Core) guess what I found!
The difference here is substantial and implies that the places we're still using Enum Containers probably require another look, or at least I should re-examine the core again to explain how there's this much of a speed difference.
It's really important to be careful about INLINE pragmas when helper methods are in a different module than they're used in, since GHC won't typically inline across modules unless asked to.
Implementation notes
Just add a bunch of INLINE annotations to EnumMap methods
Benchmarks:
trunk -> new